Skip to content

Fix test_identical_args to ignore type annotations in signature comparison - #1421

Merged
synkd merged 1 commit into
SatelliteQE:masterfrom
vsedmik:fix-test-identical-args-annotations
Jun 2, 2026
Merged

Fix test_identical_args to ignore type annotations in signature comparison#1421
synkd merged 1 commit into
SatelliteQE:masterfrom
vsedmik:fix-test-identical-args-annotations

Conversation

@vsedmik

@vsedmik vsedmik commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • requests 2.33.0 added type annotations (e.g. url: '_t.UriType', **kwargs: 'Unpack[...]') to its public functions
  • test_identical_args used inspect.signature() to compare nailgun's wrappers directly against requests functions, which failed because nailgun's wrappers intentionally don't replicate those annotations
  • Added a _strip_annotations helper that removes annotations from both signatures before comparing, so the test still validates parameter names, kinds, and defaults

Test plan

  • make test passes with requests>=2.33.0

🤖 Generated with Claude Code

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

…rison

requests 2.33.0 added type annotations to its public functions, causing
inspect.signature() comparisons to fail since nailgun's wrappers don't
replicate those annotations. Strip annotations from both sides before
comparing so the test validates parameter names/kinds/defaults only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vsedmik
vsedmik force-pushed the fix-test-identical-args-annotations branch from 326a84f to ec4a5bf Compare June 2, 2026 08:45
@vsedmik vsedmik added CherryPick PR needs CherryPick to previous branches 6.17.z 6.18.z 6.19.z labels Jun 2, 2026

@LadislavVasina1 LadislavVasina1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, CI is passing again with this patch.

@synkd
synkd merged commit cbfb67f into SatelliteQE:master Jun 2, 2026
21 of 22 checks passed
@vsedmik
vsedmik deleted the fix-test-identical-args-annotations branch June 3, 2026 08:29
vsedmik added a commit that referenced this pull request Jun 3, 2026
…rison (#1421) (#1424)

requests 2.33.0 added type annotations to its public functions, causing
inspect.signature() comparisons to fail since nailgun's wrappers don't
replicate those annotations. Strip annotations from both sides before
comparing so the test validates parameter names/kinds/defaults only.


(cherry picked from commit cbfb67f)

Co-authored-by: Vladimir Sedmik <46570670+vsedmik@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
vsedmik added a commit that referenced this pull request Jun 3, 2026
…rison (#1421) (#1423)

requests 2.33.0 added type annotations to its public functions, causing
inspect.signature() comparisons to fail since nailgun's wrappers don't
replicate those annotations. Strip annotations from both sides before
comparing so the test validates parameter names/kinds/defaults only.


(cherry picked from commit cbfb67f)

Co-authored-by: Vladimir Sedmik <46570670+vsedmik@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
vsedmik added a commit that referenced this pull request Jun 3, 2026
…rison (#1421) (#1422)

requests 2.33.0 added type annotations to its public functions, causing
inspect.signature() comparisons to fail since nailgun's wrappers don't
replicate those annotations. Strip annotations from both sides before
comparing so the test validates parameter names/kinds/defaults only.


(cherry picked from commit cbfb67f)

Co-authored-by: Vladimir Sedmik <46570670+vsedmik@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.17.z 6.18.z 6.19.z CherryPick PR needs CherryPick to previous branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants